﻿// Decompiled with JetBrains decompiler
// Type: pvdcd.PartWithProperty
// Assembly: pvdcd, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 8BE7F426-72A0-448B-ADB3-CA2AC8E1D830
// Assembly location: C:\Users\KasimGulcan\Desktop\Kosgeb\DynaCAD\Project\DynaCAD\bin\Debug\pvdcd.dll

using System;
using System.Collections;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Shapes;

namespace pvdcd
{
  [Serializable]
  public class PartWithProperty
  {
    public Part Part;
    private bool _Seam;

    public bool Seam
    {
      get
      {
        return this._Seam;
      }
      set
      {
        this._Seam = value;
        if (value)
        {
          if (this.Part.FrontLeftView != null)
          {
            Canvas canvas = this.Part.FrontLeftView;
            if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
              canvas = (Canvas) canvas.Children[0];
            if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
              canvas = (Canvas) canvas.Children[0];
            if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
              canvas = (Canvas) canvas.Children[0];
            Enumerable.ToList<Path>(Enumerable.OfType<Path>((IEnumerable) canvas.Children)).ForEach((Action<Path>) (p =>
            {
              if (p.StrokeDashArray.Count <= 0)
                return;
              p.Visibility = Visibility.Visible;
            }));
          }
        }
        else if (this.Part.FrontLeftView != null)
        {
          Canvas canvas = this.Part.FrontLeftView;
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          Enumerable.ToList<Path>(Enumerable.OfType<Path>((IEnumerable) canvas.Children)).ForEach((Action<Path>) (p =>
          {
            if (p.StrokeDashArray.Count <= 0)
              return;
            p.Visibility = Visibility.Hidden;
          }));
        }
        if (value)
        {
          if (this.Part.FrontRightView != null)
          {
            Canvas canvas = this.Part.FrontRightView;
            if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
              canvas = (Canvas) canvas.Children[0];
            if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
              canvas = (Canvas) canvas.Children[0];
            if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
              canvas = (Canvas) canvas.Children[0];
            Enumerable.ToList<Path>(Enumerable.OfType<Path>((IEnumerable) canvas.Children)).ForEach((Action<Path>) (p =>
            {
              if (p.StrokeDashArray.Count <= 0)
                return;
              p.Visibility = Visibility.Visible;
            }));
          }
        }
        else if (this.Part.FrontRightView != null)
        {
          Canvas canvas = this.Part.FrontRightView;
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          Enumerable.ToList<Path>(Enumerable.OfType<Path>((IEnumerable) canvas.Children)).ForEach((Action<Path>) (p =>
          {
            if (p.StrokeDashArray.Count <= 0)
              return;
            p.Visibility = Visibility.Hidden;
          }));
        }
        if (value)
        {
          if (this.Part.BackLeftView != null)
          {
            Canvas canvas = this.Part.BackLeftView;
            if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
              canvas = (Canvas) canvas.Children[0];
            if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
              canvas = (Canvas) canvas.Children[0];
            if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
              canvas = (Canvas) canvas.Children[0];
            Enumerable.ToList<Path>(Enumerable.OfType<Path>((IEnumerable) canvas.Children)).ForEach((Action<Path>) (p =>
            {
              if (p.StrokeDashArray.Count <= 0)
                return;
              p.Visibility = Visibility.Visible;
            }));
          }
        }
        else if (this.Part.BackLeftView != null)
        {
          Canvas canvas = this.Part.BackLeftView;
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          Enumerable.ToList<Path>(Enumerable.OfType<Path>((IEnumerable) canvas.Children)).ForEach((Action<Path>) (p =>
          {
            if (p.StrokeDashArray.Count <= 0)
              return;
            p.Visibility = Visibility.Hidden;
          }));
        }
        if (value)
        {
          if (this.Part.BackRightView == null)
            return;
          Canvas canvas = this.Part.BackRightView;
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          Enumerable.ToList<Path>(Enumerable.OfType<Path>((IEnumerable) canvas.Children)).ForEach((Action<Path>) (p =>
          {
            if (p.StrokeDashArray.Count <= 0)
              return;
            p.Visibility = Visibility.Visible;
          }));
        }
        else
        {
          if (this.Part.BackRightView == null)
            return;
          Canvas canvas = this.Part.BackRightView;
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          if (canvas.Children.Count > 0 && canvas.Children[0] is Canvas)
            canvas = (Canvas) canvas.Children[0];
          Enumerable.ToList<Path>(Enumerable.OfType<Path>((IEnumerable) canvas.Children)).ForEach((Action<Path>) (p =>
          {
            if (p.StrokeDashArray.Count <= 0)
              return;
            p.Visibility = Visibility.Hidden;
          }));
        }
      }
    }

    public PartWithProperty(Part P)
    {
      this.Part = P;
      this._Seam = true;
    }
  }
}
